package com.iterator.controller.wechat.wy.brand;

import com.iterator.bean.web.pojo.BaseRespVo;
import com.iterator.bean.wechat.wy.brand.Brand;
import com.iterator.bean.wechat.wy.brand.BrandListVO;
import com.iterator.service.wechat.wy.brand.WXBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Silence_W
 * @date: 2021-01-12 14:36
 **/
@RestController
@RequestMapping("wx/brand")
public class BrandControllerWy {

    @Autowired
    WXBrandService wxBrandService;

    @RequestMapping("list")
    public BaseRespVo list(Integer page,Integer size){
        BrandListVO brandVO= wxBrandService.queryBrand(page,size);
        return BaseRespVo.ok(brandVO);
    }

    @RequestMapping("detail")
    public BaseRespVo detail(Integer id){
      Brand brand= wxBrandService.queryBrandDetail(id);
        return BaseRespVo.ok(brand);
    }
}
